#include "Dynamics.h"

namespace poly
{
	void Dynamics::step(float dt)
	{
		for( ConstraintSet::iterator itr = constraints.begin(); itr != constraints.end(); itr++ )
			(*itr)->apply( dt );

		for( DynamicSet::iterator itr = dynObjects.begin(); itr != dynObjects.end(); itr++ )
			(*itr)->step( dt );
	}

	void Dynamics::render(float dt)
	{
		for( DynamicSet::iterator itr = dynObjects.begin(); itr != dynObjects.end(); itr++ )
			(*itr)->render( dt );
	}
}
